package audit

import "counter-help/admin/server/global"

type UserIdentity struct {
	global.GVA_MODEL
	UserID          uint   `json:"userId" form:"userId" gorm:"column:user_id;comment:用户ID;"`
	RealName        string `json:"realName" form:"realName" gorm:"column:real_name;comment:真实姓名;size:100;"`
	PhoneNumber     string `json:"phoneNumber" form:"phoneNumber" gorm:"column:phone_number;comment:手机号;size:20;"`
	DocumentType    string `json:"documentType" form:"documentType" gorm:"column:document_type;comment:证件类型;size:50;"`
	DocumentNumber  string `json:"documentNumber" form:"documentNumber" gorm:"column:document_number;comment:证件号;size:100;unique;"`
	FrontImagePath  string `json:"frontImagePath" form:"frontImagePath" gorm:"column:front_image_path;comment:身份证正面图片路径;"`
	BackImagePath   string `json:"backImagePath" form:"backImagePath" gorm:"column:back_image_path;comment:身份证背面图片路径;"`
	IsReviewed      bool   `json:"isReviewed" form:"isReviewed" gorm:"column:is_reviewed;comment:是否审核;default:false"`   // 审核状态
	IsApproved      bool   `json:"isApproved" form:"isApproved" gorm:"column:is_approved;comment:审核通过与否;default:false"` // 审核是否通过
	RejectionReason string `json:"rejectionReason" form:"rejectionReason" gorm:"column:rejection_reason;comment:驳回理由;size:255;"`
}

// TableName 自定义表名
func (UserIdentity) TableName() string {
	return "user_identities"
}
